<!DOCTYPE html>

<head>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="/js/vue.js">
    </script>



    <style>
        table,
        td,
        th {
            border: 2px solid rgb(242, 249, 236);
            border-collapse: collapse;
        }

        table td {
            padding: 18px 50px;
        }

        .a {
            border-style: groove;
            background-color: aliceblue;
        }

        .t1 {
            background-color: #11eaa1;
        }

        .t2 {
            background-color: #ffb6c1;
        }

        .t3 {
            height: 250px;
            background-color: #18d8ee;
        }
    </style>
</head>

<body>


    <div>
        <mycom :msg="Msg" @my-event="MyEvent">
        </mycom>
    </div>

    <script>
        var time = new Date().toLocaleString();
        var component1 = {
            props: ['Msg'],
            data() {
                return {
                    commsg: ''
                }
            },

            template: `
            <div>
              <div>
                <div>
                <table class="t1">
                    <tr>
                    <td class="t1">
                    <strong>图书馆人流量</td>
                    <td class="t2">
                    <a class="a">年</a>
                    <a class="a">月</a>
                    <a class="a">日</a>
                    </td>
                    </tr>
                    </table>
                    </div>
            </div>
        </div> 
        `,

            methods: {
                asd() {
                    this.$emit('my-event', this.commsg)
                }

            }

        }


        var vm = new Vue({
            el: '#app',

            data: {
                time: time
            },

            methods: {

            },

            components: {
                'mycom': component1
            }

        })

    </script>



</body>

</html>